home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
sysmon.arc
/
SYS_MON.TXT
< prev
Wrap
Text File
|
1990-10-16
|
68KB
|
1,670 lines
⌠ SysMon the ATARI-ST SystemMonitor Version 1.0.5 ⌠
|-------------------------------------------------|
⌡ Copyright (C) by Karsten Isakovic, Berlin ⌡
a ShareWare program by
Karsten Isakovic
WilmersdorferStr 82
D-1000 Berlin 12
Germany
Preface-1:
This is the english manual. I have no problems in reading english
or listening to english speaking people, but my writing is bad.
I don't have enough word and problems with the grammar, so please
forgive me.
Preface-2:
Now i am ready with the manual, it was a hard work for me. I did
the translation in two days and did not reread the text. (I have
no time...). There will be plenty errors. But i think a manual in
bad english is better than no manual.
If you send me a corrected version of this manual, you will be a
registred user and recieve automatical updates !
TABLE OF CONTENTS
===================================================
1. Installation
---------------------------------------------------
1.1 Supported hardware
1.2 Supported TOS-versions
1.3 How to start SysMon
2. General usage
---------------------------------------------------
2.1 The menubar
2.2 The keyboard layout
2.3 Function lists
2.4 Hiding function calls
2.5 The modes of SysMon
2.6 The STEP-menu
2.7 How to toggle the screens
2.8 Setups
2.9 Scrolling in the tracer output
3. The SysMon menu
---------------------------------------------------
3.1 Quick overview
3.2 C - Configuration
3.3 P - Programs
3.4 M - Memory
3.5 T - Traps
3.6 O - OS vars
3.7 D - Display
3.8 F - proFile
3.9 U - Used traps
3.10 N - Notepad
3.11 W - Write
3.12 R - ReRead
3.13 Q - Quit
4. The output of the tracer
---------------------------------------------------
4.1 The tracer line
4.2 Examples of output
4.3 The protocoll file
5. Special features
---------------------------------------------------
5.1 AES
5.2 VDI
5.3 GEMDOS
5.4 BIOS
5.5 XBIOS
5.6 LINE_A
5.7 Setup-dependent tracing
6. The traps
---------------------------------------------------
6.1 SysMon traps
6.2 The SysTable
6.3 Extended bypass functions
6.4 PD- and Trap-changes
7. Sample sessions
---------------------------------------------------
7.1 Stepwise booting
7.2 Tracing of a single AES-call
7.3 Tracing of a DA-protocoll
7.4 Tracing of a program
7.5 Detect errors/mysteries in the system
8. Extended information
---------------------------------------------------
8.1 Patch variables
8.2 Auto patch sequence
8.3 Special adaptions
8.3.1 Color screens
8.3.2 Big screens
8.3.3 OverScan
8.3.4 STE
8.3.5 TT
8.3.6 68000-68030
8.3.7 External keyboards
8.4 Interna
8.5 Bugs / Features
8.6 Extensions
9. Shareware conditions
---------------------------------------------------
10. Contact
---------------------------------------------------
10.1 Via snail mail
10.2 Via electronic mail
1.Installation
===================================================
1.1 Supported hardware
-------------------------
SysMon runs in both color- and mono-mode. It uses own routines to
output on a 2.screen.
Not only the standard resolutions are supported, but also some big
screen monitors. (Huups, i don't know the word). On such monitors
the output of SysMon appears on the SM124, which must be installed
as second-monitor.
My own OverScan expansionis also supported. (BTW: We have build a
new hardware, called AutoSwitch-OverScan. It has the same specs as
OverScan, but it can automaticly switch between the normal and
enhanced screen mode. Running incompatible programms is no longer
a problem, they simply use the old resolution)
You can redirect the debugging in/output to the modem-, printer-
or midi-port. Protocollfiles are also supported.
See also chapter 8.3 'Special features'
1.2 Supported TOS-versions
-----------------------------
SysMon should work with all TOS-versions. If you start on an unknown
TOS-version, SysMon starts to search the unknown system variables. See
chapter 8.2 'The AutoPatch sequence'
Kind | version | date | remark
-----+---------+-----------------------------
ROM | 3.1 | 09.08.90 | TT-Tos
ROM | 3.0 | 23.05.89 | TT-Tos
ROM | 1.6 | 29.07.89 | Ste-Tos
ROM | 1.4 | 06.04.89 | rainbow-Tos
ROM | 1.4 | 22.02.89 |
RAM | 1.4 | 06.04.89 | relocated Rom-Tos
RAM | 1.4 | 18.05.88 | Beta-Tos
RAM | 1.4 | 22.02.88 |
ROM | 1.2 | 22.04.87 | BlitterTos
RAM | 1.2 | 22.04.87 | KAOS-Tos
ROM | 1.0 | 06.02.86 |
RAM | 1.0 | 06.02.86 |
RAM | 1.0 | 20.11.85 |
RAM | 1.0 | 29.05.85 | Mushroom-Tos
table -1- known TOS-versions
1.3 How to start SysMon
--------------------------
You can start SysMon in the auto-folder or from the desktop. It
uses 120 KB for code and 80 KB as data space.
You enter SysMon by pressing the combination right-shift-help. You
leave SysMon by pressing SPACE or with the menu item Quit in the
SysMon menu.
If you hold the alternate key while starting SysMon, the installation
is aborted. If you hold the control key while starting, the Sys_Mon.Inf
file is not loaded.
Is the system is making a disc access, you normaly can't enter SysMon,
because there would be timing problems with the DMA chip. SysMon tests
the system variable 'flock'. Some programs set this variable permanently
(FCOPY3 while scanning/copying/formating discs). This 'flock' test is
skipped, if you press the right-shift-help and caps-lock keys.
2. General usage
===================================================
2.1 The menubar
------------------
The actual status of SysMon is shown by the capitalization of the
menu items.
- The item SysMon is capitalized if tracing is enabled. If it is
not capitalized, all other settings are ignored.
- The menu items AES, VDI, GEMDOS, BIOS, XBIOS and LINE_A are the
possible groups of system calls. Only if the item is capitalized
the calls of a function of this group are shown.
- On the right hand you can see the number and name of the active
setup. See chapter 3.2 'Configuration'
- The global trace mode of SysMon appears on the right side in the
second line. See chpter 2.5 'The modes of SysMon'
All 'extra' functions of sysmon are located in the sysmon menu.
2.2 The keyboard layout
--------------------------
SysMon is completly key driven. The menu items are selected by pressing
its first letter or by walking with the cursor keys and the return key.
SysMon has a simple window system. In a window, the active line is shown
by an inverted bar. Each window has an individual cursor, if you enter
the window a second time, the cursor appears, where it was bevor.
You move the cursor with the cursor keys (You didn't expect that ? Did you ?)
With the shift key, you move pagewise.
additon | key | remark
----------+------------+-----------------------------
| left/right | change menu
| up /down | single step up/down
shift | up /down | pagewise up/down
control | up /down | select block
| Home | beginning
shift | Home | end
table -2- movement commandos
In a function list you can modify the status of the functions with
the keys of table -5-. If you select a block by holding the control
key while walking with the cursor keys, you can modify the status of
all selected functions.
In some windows you can toggle the kind of display or suppress
unwanted information. In the upper right edge of such windows, all
valid toggle keys are listed. An option is selected, if the matching
key is capitalized. In table -3- lists other valid commands in option
windows.
addition| key | remark
---------+---------+-----------------------------
Control | Up/Down | jump to next block
| Delete | set all options
| Insert | clear all options
table -3- Option commands
The extendes command-keys of table -4- are valid in all windows or
menus. These commands consist of holding down the control key and
the first letter of the function.
Key |
---------+--------- globale setup
ESC | Tracer global on/off
TAB | Tracer mode
F1--F10 | Setup
---------+--------- Toggle function groups
^A | AES
^V | VDI
^G | GEMDOS
^B | BIOS
^X | XBIOS
^L | LINE_A
---------+--------- organisiation of the tracer-output
^R | Return address
^C | Caller name
^N | Number of function
^O | Output stack pointer
^F | Flag supervisor mode
^E | Extra output
^W | Watch bypass
---------+--------- Additional tracer-output
^P | PD-changes
^T | Trap-changes
---------+--------- Misc
Undo | close window
Help | help window
^Z | Zap (clear screen)
* | dump window to protocoll file
sh-Help | enter debugger (TEMPLEMON/BUGABOO)
table -4- global keys
THE IMPORTANT KEY OF SYSMON ARE:
- Every window is closed with UNDO
- You leave SysMon with SPACE, when no window is open.
2.3 Function lists
---------------------
Inside the menu items AES to LINE_A, the list of sub functions
is shown. The output of each function is toggled with the keys
listed in table -5-. If a functions has the mode 'space', it
will not occour in the tracer output.
Key | display | remark
--------+---------+-------------------------
Delete | space | don't trace
Insert | plus | trace
Tilde | circle | breakpoint
--------+---------+-------------------------
0..9 | 0..9 | setup-mode
D | D | debugger-mode
* | * | all-mode
table -5- SysMon commands
- don't trace This means, that no call to this function is output.
- trace All calls to this function are output, if the programm
that made the call is also selected in the programms-
window.
- breakpoint In WAIT-mode the SysMon is entered after a call to
this function. (Only if calling program is also selected)
- setup-mode A call to this function is output, if the programm that
made the call is selected in the specified setup. See
chapter 5.7 'SysMon setups'
- debugger-mode After a call to this function, SysMon enters the Debugger
this currently works only with the TempleMon-Debugger
by T.Tempelmann and J.Hill.
- all-mode A call to this function is also output, if the calling
programm is not selected in the programs menu.
2.4 Hiding function calls
----------------------------
You can hide the output of calls to functions in 4 levels.
- The highest level is to toggle to global mode of SysMon on/off with
the ESC-key.
- The next layer is the selection of programms that will produce
output. This is set up in the SysMon/Programs window. See Chapter 3.3
- The next level is the selection of functiongroups, that are trace. This
is done with the global keys ^A--^L.
- The last level is the selection of functions, that are traced.
2.5 The modes of SysMon
--------------------------
SysMon offers 4 trace-modes:
- RUN All functions are traced and output without stop.
- STEP In this mode SysMon stops after every selected function and
enters the STEP-menu. See chapter 2.6
- WAIT This mode produces no output. If a function with the breakpoint-
mode is reached and done (ie after the function), the SysMon-
menu is entered.
- HALT After the next function call, the SysMon-menu is entered. The
mode of the functions does not matter. But: if the function is
not traced, SysMon will not stop.
2.6 The STEP-menu
--------------------
When tracing in STEP-mode, SysMon stops after every function that
produces output and waits for input.
M - menu enters the SysMon-menu. When you leave the SysMon-menu with
SPACE, you are back in the STEP-menu.
0--9 chooses the active setup. You can also use the function keys
F1--F10. The keys 0--9 are needed, because not all input
devices have functions keys.
All commands from table -4- are supported in the STEP-menu. All other
keys leave the STEP-menu.
In the SysMon/Display window you can set up a STEP-filter. This value
says how many lines to output without stopping in the STEP-menu.
2.7 How to toggle the screens
--------------------------------
SysMon outputs in a 2.screenpage. If you enter SysMon this page
is displayed. If global tracing is enabled, you can show the
second screen, by holding down the right shift-key. If tracing
is disabed, the right shift-key does not work.
You can change the mainly displayed screen by pressing the right
shift-key and Caps-lock. If toggled, the original screen will show
when pressing the right shift-key.
On color-monitors, SysMon uses mid-res on it's own screen. The color-
palette is corrected.
If you use AutoSwitch-OverScan, SysMon uses the mode that was active
at the startup of Sysmon.
On a color-monitor with AutoSwitch-OverScan, the pressing of the
right shift-key could (in the hardest case) change AutoSwitch-mode,
resolution and color-table!
In some cases, the output of SysMon is to quick to read (Look at the
TT and you see what i mean). In the SysMon/Display window is a
variable called 'Pause'. In Pause-mode the output stops, while watching
the SysMon-screen, the other modes wait for a little amount of time
(In msecs).
2.8 Setups
-------------
SysMon offers 10 setups, which are selected with the function keys
F1--F10. Nearly every setting in SysMon is setup-dependent. By
switching the setup you can change to a complete 'other' SysMon.
You can build a setup for every case of work you have to do with
Sysmon and save it. Later if you need it, you can use the saved
setup.
The following things are toggled:
- state of programms
- state of function groups
- state of functions
- trace-mode
- configuration of the tracer-output
2.9 Scrolling in the tracer output
-------------------------------------
When no window is open, you can walk back in the tracer output with
the cursor up/down key. By default additional 50 lines are buffered,
you can change this with the patch variabes. See chapter 8.1
3. The SysMon menu
===================================================
3.1 Quick overview
---------------------
Under the SysMon menu item you find a list of sub menues. You select
these by pressing the first letter or by walking with the cursor and
pressing RETURN.
C - Configuration Shows/configures all 10 setups
P - Programs List of all loaded programs
M - Memory List of all memory blocks
T - Traps List of all system vectors
O - OS Vars. List of all system variables
D - Display Everything for input/output
F - proFile Everything for the profiling functions
U - Used Traps List of active SysMon-traps and hooked functions
N - Notepad Enter comments into the protocoll file
R - ReRead ReRead the Sys_Mon.Inf setup file
W - Write Write the Sys_Mon.Inf setup file
Q - Quit Unhook SysMon form the system
3.2 C - Configuration
------------------------
The configuration window is an overview for all 10 setups. You can
change the settings with the global keys listed in table -4-.
Each line consists of:
- Name of the setup. This is editable. Use the backspace key
to erase unwanted characters.
- The trace mode is output as Run, Step, Wait or Halt.
- The trace mode of each function group is expressed by their
first keys. AGX means that AES,GEDOS and XBIOS calls are traced.
- The output format of every function is configured in the next
row. R stands for ReturnAddr, C for Caller, N for Number,
O for OutputStack, F for FlagSuper, E for Extra and W for WatchBypass.
- The mode of the extra functions (Show PD- or Trap-changes) ist listed
with the keys P and T.
The actual setup is changed with the function keys or with the cursor
keys. Neary every setting of SysMon is setup dependent. See chapter 2.8
3.3 P - Programs
--------------------
This is the list of loaded programs. For each program the mode is
selected with the keys of table -5-. The program 'Unknown'
represents the trace mode for calls that come from memory blocks
that are not recognised by SysMon.
Each line of the window consists of:
- Start/end address of the program
- The name of the program follows following rules
- The name is capitalized, if it is the real name of the
program.
- Names with mixed letters are used, if SysMon knows the program
because of it's XBRA-ID.
- The names Acc__A, Auto_A, Prg__A etc. are used, if SysMon does not
know the name, only the type of program.
You can edit names with mixed letters. This is shown by the
<<..>> brackets. You can only enter capitalized letters, to erase
a character, use the backspace key.
An empty name is not valid, it is changed to ???
- The trace mode of the program is listed in the next row. This mode
is modified with the keys in table -5-.
- The program, to which ActPD points, is highlighted with an R-symbol.
- The Appl-ID of the program is output. With Stuffer and other multi-DAs
it is normal that the same ID is used.
- The VDI-handles are output. This is only possible, if SysMon
traces the VDI-trap.
- The kind of program is output-
- TOS used only for both parts of the system (TOS and GEM)
- Auto used for programs that were started in the auto-folder.
These are residend loaded.
- Acc used for DAs
- Prg used for normal programs
- Res used for residend loaded programs
- LPrg used for programs, when the code-space is not owned by
the same process. (LoadedProgram)
- Cart used for Cartridge programs
3.4 M - Memory
-----------------
This window shows a sorted list of memory blocks. Resident memory
blocks are also included. At the top of the list is the end of
memory, the bottom of the list is the start of memory. On the TT
the FastRAM memory is seperated by a dashed line.
Each line of the window consist of:
- The address of the memory descriptor
- A fast ram flag on the TT
- The start/end address and size of the memory block
- The owner of the block. Free blocks have no owner, so the owner
is output as 'free'. Resident blocks are not listed in the memory
descriptors, they are listed as 'res'.
The HideMem convention is also recognized: Thus if all 4 bytes of
the 'owner' longword are valid ASCII characters, these are
output as an ID.
- If possible, the name of the programm is output
- The following kind of memroy blocks are recognised:
- program code
- environments
- loaded resources
- AES blocks
- VDI blocks
- basepages
- LineF handler
- loaded VDI fonts
- CPX header
- CPX code
- directory buffers of the desktop
- screen memory
All others have the status 'Data'. The test is very simple, so
don't worry if SysMon goes wrong.
In this window followibng options are possible:
- L,$ toggle Hex/Dec mode
- O toggle owner Hex/Name
When you press return, the selected memory block is shown in hex dump
mode. This works only if the block is smaller than 524272 Bytes. You
can move the cursor in the hexdump with cursor keys.
3.5 T - Traps
----------------
This is the list of system vectors. SysMon follow XBRA-list und
names the destination.
All traps and vectors of the ST and TT are listed, even the ones
that are unused by the system.
You can hide some information, bacause the list can be very long.
The following keys toggle the display of
H - Hardware
U - Unused Exceptions
I - Interrupt
T - Trap
M - MFP
E - ETV
S - Special
V - VBL
X - Xcon
K - Kbd
L - LineA
Two special key toggle the display of
R - ROM All jumps with the destination in the OS
N - NotValid All jumps with invalid adress
3.6 O - OS vars
------------------
This window lists all variables and structures of the operating
system. Like in the Traps-window , you can hide unwanted information
with some option keys.
S - System variables All system variables between $400 and $5A0
N - Negativ LineA All negative LineA variables
L - LineA All LineA variables
V - VDI All data of all VDI-workstations
C - Cookies All cookies in the CookieJar
P - Programs For every programm the program header, basepage or
cartridge header is output
F - Fonts All data of every loaded VDI-font
H - Header The header of the operating system
Some vectors, that are shown in the Traps-window, are also listed. The
XBRA-chains are not followed.
3.7 D - Display
------------------
The display window lists all settings which have to do with the
input and output.
Das DISPLAY-Menü enthält alle Einstellungen, die die Ein-/Ausgabe
betreffen. Die Umschaltungen der Ein-/Ausgabe sind erst nach
Verlassen des SysMon Bildschirms gültig. Die einzelen Punkte können
durch Drücken des Anfangsbuchstabens oder durch Wandern mit den
Cursortasten und der Returntaste angewählt werden.
I - Input toggles the input device from keyboard to RS232,
paralell port and midi. The change starts operating
after leaving the SysMon screen.
O - Output toggles the ouput device from 2.screen to RS232,
paralell port and midi. The change starts operating
after leaving the SysMon screen.
F - File output toggles the protocollfile on/off. In some cases it
is not possible to open/close a file. In this special
cases a warning messages appears. See chapter 4.3
If the file already exists, a little dialog offers
the following choices:
overwrite, append or abort
N - Name This is the name of the protocollfile. You can edit
the name, valid keys are letters,numbers, point,
colon, underscore and backslash. All others keys
end the edit mode.
J - Jump scroll This value says how many lines are output without
scrolling. 10 means, output 10 lines and then scroll
up 10 lines.
Because the scrollroutine is only called every 10th line,
the output speed of SysMon is bigger.
Shift-J decrements the number.
S - STEP filter This value says how many lines are output in STEP mode
without stop.
P - Pause on view This toggles the display option. If the pause mode is
selected, output stops while viewing the SysMon screen
with the right shift key.
The other modes (50 ms to 500 ms) sets the delay after
each function. If the SysMon screen is not shown, there
is no delay.
3.8 F - proFile
------------------
In this window you can toggle the profile options of SysMon. Profiling
means that Sysmon counts every functions call and lists this value in
the function list. Only functions that are traced are counted. With
profiling you get an overview over the mostly called functions of your
program.
P - Profile Toggles the profiling. The profiling data is not cleared,
this can be used as a break in counting.
D - Dump All data in written into the protocollfile. If no protocoll
file is open, it is opened and afterwards closed again.
Only the selected traps/functions are written to the file.
S - Show func. Toggles the display of functions. The profiling is speeded
if no output from the function is selected
C - Clear Clears all profiling data
3.9 U - Used traps
--------------------
This window shows an overview off the traps and bypasses SysMon
is hooked into.
Each line in the window consists of:
- On the left the precedor, the trap or program that points to the
SysTable
- In the middle the address of the SysTable
- On the right the successor, the trap or program to which to
SysTable points
- On the right edge is a short-key that describes the vector
A/V stand for AesVdi, G for GEMDOS etc.
There are two display modes of the BypassTable, which are toggled with
the M key.
- Active traps and bypasses are listed in two tables. The bypasses
are listed in the order in which they are used.
- Active traps and bypasses mixed in one table. The order in a
trap is the order in which the bypasses/hooks are used.
Another list lists all functions that have not returned from the
call. This is also the contents of the FunctionTable. See chapter
6.1 and 6.2
3.10 N - Notepad
-------------------
The notepad window offers the possibilty to enter comments into
the protocoll file.
The active line is show by the bracets <<..>>. All ASCII characters
are valid key, extra functions are:
- CLR clear all lines
- BS clear last character, together with shift clear line
- CR to next line
In a protocoll dump only the lines containing characters are listed.
If you want a blank line, you must enter a SPACE.
3.11 W - Write
-----------------
This function save all settings of SysMon into the file SysMon.Inf.
This file is loaded when SysMon starts up. If writing is not
possible, a warning message is output.
All settings of the 10 setups are stored. An exception is the status
of the programs. It is possible that at the next start of SysMon
other programs are loaded and active. So SysMon save just a default
state for every group of programs. (TOS, Auto, Acc, Res, Prg, LPrg,
Cart, Unknown)
- If no program of a group is selected, 'no trace' is saved.
- If one or more programs of a group are 'traced', 'trace' is
saved.
- If one or more programs of a group are 'breakpoints', 'breakpoint'
is saved.
- If there is no progam of a group loaded, 'trace' is saved
3.12 R - ReRead
------------------
This menu item rereads the SysMon.Inf file. If reading is not
possible or the file does not exist, a warning message is output.
All settings of the file are installed.
3.13 Q - Quit
----------------
This menu item quits SysMon after a question.
If you quit SysMon a dialog says whether the SysTable must stay
resident or not. There are 4 kinds of QUIT :
- If there are bypasses, the SysTable must remain in memory,
because other programs could jump to this bypasses
- If there are no bypasses, but functions that will return to
the SysTable, the SysTable is not removed. After the last
function returns, the SysTable is also removed.
- If you QUIT whilst in a GEMDOS call, SysMon must wait until this
call returns. Thios is the same problem as with the protocoll file
See chapter 4.3
- If there are no bypasses and no functions in the FunctionTable
SysMon removes itself totally. You will hear a acustic signal.
At the next start SysMon will find a SysTable and use it. If you
leave again, the SysMon memory is totally removed. So there is
only one active SysTable in memory. See chapter 6.1 and 6.2
4. The output of the tracer
===================================================
4.1 The tracer line
----------------------
The output of the tracer line is configured with the global
keys ReturnAddr, Caller, Number, Output Stack, FlagSuper. An overview
of the active setting is given in the CONFIGURATIONs window.
The start of each line has the following format:
- If a taskswitch occured while tracing AES-calls, a '>' is output
- If ReturnAddr is enabled, the return adress of the call is output.
- If Caller is enabled, the name of the calling program is output.
- If Number is enabled, the function number plus a letter is output.
The letter stand for the function group, ie 'A' for AES and so on.
The letter 'O' is used for calls of the GEM-trap, that have another
index than AES or VDI calls. An examples are the 'vq_gdos' and
'vq_driver' call.
- If OutputStack is selected, the current stack pointer is output
- If FlagSuper is selceted, a little dot is output if a call was made
in supervisor mode.
After this header the function name is output. If calls interlock,
the function names are indented. An example is if you display the
calls from GEM and TOS. The GEMDOS-function 'Fread' and 'Fopen'
involve an XBIOS call of 'Rwabs'. Or the call of 'v_opnwk' and
'v_opnvwk' involve calls to the GEMDOS-function malloc.
If an interlocked call returns, the header is repeated so that you can
see the function that is returned.
Now the input parameters of the function are output. Values that
are defined as constants in the 'ProfiBuch', are output with names.
If a function has got more than one parameter, short memnonics are
output in front of the value, so that you can identify the values.
The sequence of the parameters corresponds to the sequence in the
function call. If the functions uses 'call by reference' variables,
only the address of this variable is output. The value is output
when the output parameters are written.
To emphase that a function returned from the system a '->' is
output. If a function has no return paramters the '->' is
still output to show that the function has returned.
If WatchBypass is enabled with the global key ^W and the additional
bypasses were installed at the start of SysMon, the '->' is replaced
with '-[ProgramName]->' if SysMon discovers that the function
was answered by another program and not by the operating system.
A '-{ProgramName}->' means that the program hooked itself after
the call by modifying the return address. See chapter 6.3
After the '->' the return parameters are output. The return value
of a function is written after 'Ret'. GEMDOS- and BIOS- functions
output all system error messages in text form.
If ExtraOutput is enbled with the global key ^E extra information
is output. This extra information produces lot of output, because
all elements of structures etc. are listed (the longest struct is
the BITBLT struct which produces 4 lines of output...) Also values
are output that are not on the stack, but corespond to the function.
GEMDOS functions that only use a file handle output the file name,
the DTA is listed when calls to 'Fsfirst', 'Fsnext' is made,
the AES functions that deal with objects output the type and string
of the objects in use etc. Extra output is placed in <...> brackets.
See chapter 5
If the list of values is longer than a screen line, a wrap and
indent takes place.
4.2 Examples of output
-------------------------
The first example shows an interlocked sequence of calls. The return
value of the outer 'Fsfirst' call is emphase by the repetition
of the header.
$FC38B0 GEM G_78 Fsfirst "C:\C_TEX\*.*" { Dir }
$FC4F0E TOS B_4 Rwabs READ Buf $7BC4 Cnt 1 Rec 38 Dev 2 -> Ok
$FC38B0 GEM G_78 Fsfirst -> Ok <.>
$FC38B0 GEM G_79 Fsnext -> Ok <..>
$FC38B0 GEM G_79 Fsnext -> NoMoreFiles
The trace line in this example consists of ReturnAddr, Caller for the
program name and Number for the function number. ExtraOutput was
disabled, otherwise the 'Fsfirst' and 'Fsnext' call would output
not only the name but also the length date and state of the file.
The next example shows which calls are produced by opening the
first VDI workstation when booting the computer. The FlagSuper
option was enabled. So every call that was made in supervisor mode
shows a little * in front of the name
GEM *v_opnwk H 0 3,1,1,1,1,1,1,1,1,1,2
TOS *Getrez -> High
TOS *Setpalet PAL $FCB39E ->
TOS *Setexc Vec 256($0400) New $FCB3C6 -> Old $FC92C6
TOS *Initmouse Mouse On,Relative PARAM $FD0F62 { topmode 0
buttons 0 x_scale 1 y_scale 1 } Vec $FD09FA ->
GEM *v_opnwk -> H 1 (639,399)
As you see, all calls of the desktop are in supervisor mode. The
interlocking of calls is visible through the indentation. Also
a '->' directly behind a function call shows that this function
just returned and that the input parameters are listed before.
If TOS was not selected in the PROGRAMs window, the output
parameters of the 'v_opnwk' call would appear in the same line
as the input parameters.
The next example shows a task switch of AES between CONTROL.ACC
and TURBOST.ACC
TURBST16 appl_init
CONTROL appl_init
>TURBST16 appl_init -> 3
TURBST16 menu_regis. " Turbo ST" 3
>CONTROL appl_init -> 2
CONTROL graf_handle
>TURBST16 menu_regis. -> 0
TURBST16 evnt_mesag $0427A4
>CONTROL graf_handle -> (8 ,16 ) (19 ,19 ) Ret 1
CONTROL menu_regis. " Kontrollfeld" 2 -> 1
A '>' shows that another process returned from the trap than the
one who entered the trap. The '->' shows in a simple way what
was the input and what was the output function.
CONTROL Setprt { Matrix,Mono,Atari(1280),Draft,Centronics,
Endless } -> { Matrix,Mono,Atari(1280),Draft,
Centronics,Endless }
CONTROL Rsconf Speed 4 Flow 0 Ucr/Rsr (-1 ,-1 ) Tsr/Scr
(-1 ,-1 ) -> Register $000000
If a parameter line is longer than a screen line, a wrap and
indent takes place. Bitsets and structs are shown in {...}
brackets.
The 'evnt_multi' call has a long and complex parameter list.
CONTROL evnt_multi KYBD BUT { 1,1,1 } MSG TIMER { 30000,0 }
Buf $040E00 -> (201,101) B$00 K$00 Key
$0000 But $00 Event = MU_MESAG
{ WM_CLOSED H 4 }
As you see the values are easy to read, the secence is the same
seqence like in the c call. This example waits for a keyboard,
button, message or timer event. You can see the parameters of
each selection. the function returned with some values
for the buttons, keyboard state etc. The recieved event is a
message event that says that the user closed window 4.
GEMINI Fopen 'C:\GEMINI\MUPFEL.MUP' ReadOnly -> $000007 /7
GEMINI Fseek H 7 <MUPFEL.MUP> Off 0 FromEnd -> $000490 /1168
GEMINI Fseek H 7 <MUPFEL.MUP> Off 0 Relative -> $000490 /1168
GEMINI Fseek H 7 <MUPFEL.MUP> Off 0 FromStart -> Ok
GEMINI Fread H 7 <MUPFEL.MUP> Cnt $000400 Buf $079A48
-> $000400 /1024
GEMINI Fread H 7 <MUPFEL.MUP> Cnt $000400 Buf $079A48
-> $000090 /144
GEMINI Fclose H 7 <MUPFEL.MUP> -> Ok
The output of the file name in addition to the file handle is one
of the extra features of SysMon. It is enabled with the ExtraOutput
option and placed in < ... > brackets.
Some other examples for extra output:
GEMINI menu_ienab. $0843FA 18 < Open ^O> disable -> 1
GEMINI menu_ienab. $0843FA 19 < Get Info... ^I> disable -> 1
GEMINI menu_ienab. $0843FA 44 < Application... ^A> disable -> 1
GEMINI menu_ienab. $0843FA 27 < Erase Disk... ^E> disable -> 1
GEMINI evnt_multi KYBD BUT { 2,1,1 } MSG Buf $075594 ->
(136,454) B$01 K$01 Key $0019 But $01
Event = MU_BUTT
GEMINI wind_find (136,454) -> 0
GEMINI objc_find $078260 (0 ,8 ) (136,454) -> Nr 10
< G_ICON "ZOO" > (10 ,136) Ret 10
All AES-functions which dial with objects output the name
and string of the object. So you see which menu item was
enabled at the 'menu_ienable' call or you get the name of the
menu item the user selected when a program recieves a
'MN_SELECTED' message. After the button event, GEMINI tests
with 'objc_find' if an icon on the desktop was hit. The
'objc_find' call outputs the string of the icon if ExtraOutput
is enabled.
4.3 The protocoll file
-------------------------
All output of SysMon can be written into a file. You can enable and
disable this feature in the DISPLAY window.
When a MediaChange occurs, all opened files of a drive are closed
automatically. If you want to protocoll the build up of the desktop,
you must select another drive for the protocoll file, because the
pressing of ESC in a desktop window produces a MediaChange and the
contents of the protocoll file would be lost.
All BIOS call of the GEMDOS use the same stack, so it is not
possible to call GEMDOS while in a BIOS call. (The GEMDOS call
would make BIOS calls and destroy the old contents of the stack)
This is the reason why sometimes opening and closing of the
protocoll file is not possible and only a warning message is output.
The protocoll of BIOS calls is only possible, because SysMon has
an internal puffer. All BIOS calls are written into the puffer and
only written to the file when it is save. You can modify the size
of the puffer in the patch variables. See chapter 8.1. If an
overflow occurs a message is written to the protocoll file.
Special features in conjunction with the protocoll file
- You can dump the contents of every window into the protocoll file
by pressing the * key on the numeric keypad. In this way you can
write down the state of the system.
- Even the function lists can be dumped, so you can record, which
functions were selected
- If no window is opened, the global state of SysMon is dumped into
the file.
- The notepad is a simple editor to insert comments into the
protocoll file.
- If you save the SysMon setup while a protocoll file is opened
the file will not be opened at the next start. This would overwrite
the old protocoll file which is not what you expected.
5. Special features
===================================================
5.1 AES
----------
The user defined messages from the programs GEMINI, CLIPBRD, CAD-3D,
DEGAS, CYBERSMASH, TDI_MODULA and the XACC- and IDC -protocoll
messages are known and output.
The 'extra-output' includes the output of the object type and the
string of an object, when using objc_xxxx or menu_xxxx functions.
5.2 VDI
----------
All extended VDI-Metafile Escapes and the MFDB stuct are output.
You cannot STEP-trace the functions 'vex_timer', 'vex_button' and
'vex_mouse'.
The functions 'vq_gdos' and 'vq_driver' are no real DVI-functions,
because they use another stack convention. The mode for these
funtions is selected through the 'Unknown'-function in the VDI-
function list.
5.3 GEMDOS
-------------
All network-functions are known and output with parameters. The
'extra-output' include the DTA structure at 'Fsfirst', 'Fsnext'
calls, the real file name at every call with file-handles, the
previous block size at 'Mfree' and 'Mshrink' und the structs
DISKINFO and DOSINFO. The new TT-function 'mxalloc' is also
supported.
Under Color-OverScan the screen toggles (for a short time) to the GEM
screen, when the function 'Pterm0', 'Pterm' or 'Ptermres' are
called.
5.4 BIOS
-----------
The functions 'Setexc' and 'Ticcal' are not traced in STEP-mode.
The BPB struct is shown when 'extra output' is active.
5.5 XBIOS
------------
The function 'Floprate', every TT function and the OverScan XBIOS-
extension is supported.
The structs PARAM, IOREC, KEYTABLE, KBDVECS and PBDEF are listed
when 'extra-output' is active.
If the functions 'Physbase', 'Getrez' or 'Setscreen' are called when
the SysMon screen is show, ist is necessary to toggle to the GEM
screen and back to the SysMon screen.
5.6 LINE_A
-------------
All variables corresponding to a function are output. The structs
MFORM, SDB and BITBLT are output, when 'extra-output' is active.
5.7 Setup-dependent tracing
------------------------------
The setup dependent tracing is archived with the modes 0..9 in the
function lists. This modes are independent from programs that are
selected in the programs window. A function is output, if the calling
program is selected in the setup with the mode number.
Because this is a little complicated, here an example:
You want to trace VDI, not only the calls of your program, but
also the calls of the SCRNMGR through the AES.
Some VDi calls appear quite often and have no value for you.
'vq_mouse','vrq_string' etc..
You don't want to see them, but if a program call them you
want to see them.
If you deselect the function in the function menu, they don't
appear any more, even if a normal programm calls them. This is
not what you wanted.
For this problem setup dependent tracing is the solution.
The active setup is '1', all programs and GEM are selected.
In setup '2' all programs are selected, but GEM is not
selected.
If you choose the mode '2' for the annoying functions
'vq_mouse','vrq_string', etc...
these functions are only show, if the call came for a
program that is selcted in setup '2'.
Thus GEM is not selected in setup '2' call of these
functions is not listed, when the SCRNMGR makes them,
but they are listed if a program calls them. All other
functions of the SCRNMGR are listed.
6. The traps
===================================================
6.1 SysMon traps
-------------------
If SysMon is disabled, it hooks only in the keyboard-, VBL- and
GEMDOS-vector.
If SysMon is enabled, also the AES/VDI, BIOS, XBIOS and LINE_A
vectors are hooked to SysMon. All traps watch the other traps,
if a trap changes a bypass is build.
SysMon is always the first hook in the trap, because this is the
only way that no function is stolen from other programs. It is hard
to believe that another prorgam can deinstall SysMon from the traps,
all traps must change in the same time, otherwise SysMon rehook
itself.
The GEMDOS-vector is watched even if SysMon is disabled, in order
to know when programs start/end.
With a little trick, the successor of a call doesn't realise that
the return address of a program has changed. This is needed for some
programs (STUFFER, ICONDESK...)
6.2 The SysTable
-------------------
The SysTable is an independant part of SysMon. It resides at the
start of the SysMon program and consists of the BypassTable, the
FunctionTable and the functions to manage these tables.
If Sysmon quits, this part remains in memory if there are bypasses
or some functions have not returned yet. The SysTable unhooks this
functions if they return and removes itself from memory it is no
longer needed.
If SysMon is started and finds a SysTable, it uses this SysTable.
All actions associated with the traps, the redirection of functions
and the quitting of SysMon are managed by the SysTable. In this way
there is only one active SysTable in memory. If you start SysMon
repeatedly no new BypassTable or FunctionTable is needed and SysMon
can be totaly removed from memory.
if another program hooks into a trap SysMon build a bypass in the
BypassTable and rehooks to the first position in the trap. If the
program rehooks the trap to the old value, the bypass is freed.
The BypassTable is only scanned at the start of SysMon, unused
bypasses (pointing to free memory...) are removed.
The FunctionsTable is needed, because the ST has not only one
process at a time. All running processes can make system calls
and so they must be managed seperatly. SysMon not only lists
the input parameters of a function. This means SysMon must hook
into each call and output the returned values after the function.
Not all calls terminate immediately after they are called. A good
example is the 'Pexec' call. Sysmon does not wait until the
pexec has terminated. It outpus the input parameters and puts the
call into the FunctionTable. Now the next functions produces
output. Later if the 'Pexec' returns to the SysTable, SysMon restores
the correct return address from the FunctionTable and clears the
functions in the table. Other good examples are the AES-calls. The
limited multitasking of the ST means that another call return form
the GEM-trap than the one who entered it.
SysMon manages all traps in its internal stacks. Hence all calls from
interrupts and VBLs , RTX and other MultiTasking extensions are no
problem to SysMon. Interlocking calls of different processes are
managed. Here is an extreme example, that you can see with an old
TEMPLEMON (resident debugger).
A GEM program makes a 'evnt_multi' cal. This call makes a 'vrq_string'
from the SCRNMGR, the 'vrq_string' makes a `Bconstat' to get the state
of the keyboard. If you press a key, you can see that TEMPLEMON,
which resides in the keyboard-vector calls 'Iorec', and then the
interlocking breaks up...
The SysTable manages these stacks seperatly, so that SysMon can
quit at every time.
You can view the state of the BypassTable and FunctionTable in the
UsedTraps window.
6.3 Extended bypass functions
--------------------------------
In the CONFIGURATION-window you can set the Flag WatchBypass. If this
flag is set, an extended test is done in every bypass. SysMon can
test, which program answered a call, or which program stole a
call or made direct call without going through the trap. Such
tricks are commonly used, examples are GDOS.PRG, SHELL.ACC,
TURBOST.ACC, OVERSCAN.PRG, STUFFER.ACC and all ST networks.
The WatchBypass function works only if SysMon is started before
the other programs and if the WatchBypass-Flag is set while the
setup is saved!
If the flag is set at the start of SysMon, SysMon tries to insert
bypasses between every program that hooks into the traps. This
works only if the programs follows the XBRA-convention, otherwise
the jump adress of a program can not be modified.
The inserted bypasses build up platforms, if entered SysMon analyses
the incomming call:
- SysMon stores the last used bypass for each trap. If a call does
not enter the system, SysMon can say which program answered the call
- SysMon can say when other programs modify the return adress of
a call. (Hooked in after a call)
- SysMon watches for the function number. By this, SysMon detects
calls that were just put onto the stack and did not come from
the trap.
If tracing is disabled, the bypass tests are not activated and
consume no time and processor power.
6.2 The SysTable
6.3 Extended bypass functions
6.4 PD- and Trap-changes
----------------------------
The change of the active process and modifications of the SysMon traps
are displayed if enabled with the global keys ^P for PD-change and
^T for TrapChange. If ouput is disabled or SysMon is disabled, the
tests occur silently.
7. Sample sessions
===================================================
7.1 Stepwise booting
----------------------
(No yet written...) All needed settings are told (SysMon in first
place in the auto-folder, first boot and make settings: Step-Mode,
tracing enabled, all programs selected,all function groups, all
functions selected, extra output, PD-/Trap-change, now save
settings and reboot) The programs in this example should be
TOS14FIX, TEMPLEMON, GDOS, CONTROL.ACC and TURBOST.ACC.
The example should show that it is the harddisk driver that loads
in the auto-folder programs and then starts the GEM. You can see
that the GEM-trap is restored after every resident program. When
GEM is started, you see how the first VDI workstation is opened
and the AES taskswitching. TURBOST is a program that installs
itself in some traps.
7.2 Tracing of a single AES-call
-----------------------------------
(Not yet written...) This example should show, which functions
are made by a 'form_alert' call.
7.3 Tracing of a DA-protocoll
--------------------------------
This session shows a simple DA-protocoll between the GEMINI-shell
and the CLIPBRD.ACC. In GEMINI the CLIPBRD should be installed
as default application for all files.
SysMon is set up the following way:
SysMon must starts in the auto folder of the boot disk, if you want
to see start of the DA.
In the CONFIGURATION window , the setup is given a name, with the
TAB-key select the HALT mode, with the global keys ^A,^V and ^G
the function groups AES, VDI and GEMDOS are selected. PD- and
Trap-Changes are selected with ^T and ^P.
In the PROGRAMS window GEMINI and CLIPBRD are selected with the INSERT
key. all other programs should be deselected.
In the SYSMOn-menu tracing is enabled with the ESC key. This setting
is saved with 'Write setup'.
At the next reboot SysMon stops at first call of a DA. Now deselect
the other DAs. Continue in STEP or RUN mode.
CLIPBRD Mshrink $03EEC8 < Size $015E10/89616 > NewSize
89616 -> Ok
CLIPBRD appl_init
CLIPBRD appl_init -> 3
CLIPBRD graf_handle -> (8 ,16 ) (19 ,19 ) Ret 1
CLIPBRD wind_get H 0 WORK -> (0 ,19 ) (640,381)
CLIPBRD Dgetdrv -> Drive C
CLIPBRD Dgetpath Buf $054BCC Drv 0 (active) -> ""
CLIPBRD shel_read -> "CLIPBRD.ACC" ""
CLIPBRD menu_regis. " GEM-Clipboard" 3 -> 1
CLIPBRD scrp_read $04F3BE -> ""
CLIPBRD Dsetdrv $0002 C -> Drives ABCDEF
CLIPBRD scrp_write "C:\CLIPBRD\" -> 1
...
CLIPBRD evnt_multi KYBD BUT { 2,1,1 } MSG Buf $054CA0
The CLIPBRD uses the function 'scrp_read' to get the path to the
CLIPBRD directory. If the path is not set, it is set by the DA.
With 'Fsfirst' the CLIPBRD tests, whether the desired path exists.
If not CLIPBRD makes a new directory.
...
GEMINI scrp_read $0903F8 -> "C:\CLIPBRD\"
...
The GEMINI shell also uses 'scrp_read' and 'scrp_write' to
set up the path to the CLIPBRD directory.
GEMINI evnt_multi KYBD BUT { 2,1,1 } MSG Buf $090418 ->
(132,120) B$01 K$01 Key $0000 But $02 Event
= MU_BUTT
GEMINI wind_find (132,120) -> 2
GEMINI objc_find $0A2500 (0 ,8 ) (132,120) -> Nr 8 < G_ICON
"SOWTW.TXT" > (8 ,132) Ret 8
GEMINI objc_offset $0A2500 8 < G_ICON "SOWTW.TXT" > ->
(1 ,82 ) Ret 1
...
GEMINI appl_find "CLIPBRD " -> 3
GEMINI wind_update BEG_UPDATE -> 1
...
GEMINI graf_growb. (82 ,104) (78 ,40 ) (0 ,19 ) (640,381) -> 1
GEMINI appl_write ID 3 Cnt 16 $090194 { GEMINI : "E:\SOWTW.TXT"
} -> 1
GEMINI wind_update END_UPDATE -> 1
If you doubleclick onto a file in GEMINI, the application for this
file is started. In this case this is the CLIPBRD.ACC. GEMINI
searches with 'appl_find' for the DA. If installed, GEMINI sends
a GEMINI-message with 'appl_write' to the DA.
>CLIPBRD evnt_multi -> (132,120) B$00 K$01 Key $0013 But $00
Event = MU_MESAG { GEMINI : "E:\SOWTW.TXT" }
CLIPBRD graf_mkstat -> (134,119) But $00 Key $0001
CLIPBRD wind_update BEG_UPDATE -> 1
...
CLIPBRD Fopen "E:\SOWTW.TXT" ReadOnly -> $000007 /7
CLIPBRD Fseek H 7 <SOWTW.TXT> Off 0 FromEnd ->
$00076E / 1902
CLIPBRD Malloc $00076E -> $0A3746
CLIPBRD Fseek H 7 <SOWTW.TXT> Off 0 FromStart -> Ok
CLIPBRD Fread H 7 <SOWTW.TXT> Cnt $00076E Buf $0A3746 ->
$00076E / 1902
CLIPBRD Fclose H 7 <SOWTW.TXT> -> Ok
...
CLIPBRD wind_create { NAME CLOSE FULL MOVE INFO SIZE UPAR DNAR
VSLIDE LFAR RTAR HSLIDE } (0 ,19 ) (640,381)
-> 3
...
CLIPBRD wind_open H 3 (7 ,91 ) (580,216) -> 1
CLIPBRD appl_write ID 0 Cnt 16 $054BC8 { SCRP_OK } -> 1
...
CLIPBRD wind_update END_UPDATE -> 1
The CLIPBRD recieves the message and understands what to do. It opens
a window and displays the file. An answer message (SCRP_OK) is send to
GEMINI.
One couriosity is that in the docs to CLIPBRD only the SCRP_xxx messages
are listed and not the GEMINI message! If you send a "" string, only
the main window of the CLIPBRD is opened.
7.4 Tracing of a program
---------------------------
This session shows how the MultiDA STUFFER loads other DAs and how
it manages them.
In the CONFIGURATION window the setup '3' is set up as followed:
AES,VDI, GEMDOS, BIOS etc on, STEP mode, TrapChanges an. Get the
traps with ESC and select STUFFER in the PROGRAMs window. Now save
and reboot.
After the standard 'app_init' and 'menu_register' STUFFER waits
for the desktop to come up. This is done with several calls
to 'wind_update(BEG/END)'. After that the dialogbox is drawn
an the GEMDOS path is set to the STUFFER directory. With 'Fsfirst'
and 'Fsnext' all *.ACC are found. Now STUFFER hooks into the
GEM and BIOS trap.
STUFFER Malloc $FFFFFF -> $098E50
STUFFER Kbshift Mode -1 -> NoState
STUFFER Cconws "ADDRESS.ACC" -> Cnt 26
STUFFER Pexec Load "C:\STUFFER\ADDRESS.ACC" "" -> $05F1B4
STUFFER Mshrink $05F1B4 < Size $098E4C/626252 > NewSize 54204
-> Ok
ADDRESS appl_init
>ADDRESS appl_init -> 2
The name of a DA is not written into the dialogbox, but written
with 'Cconws'. This is the reason, why it doesn't work on big
screens or under OverScan. The position of the dialogbox is not
the same than in standard resolution.
With 'Pexec(Load)' the DA is loaded an with 'Mshrink' the memory
is sized to the amount, the DA needs. The the DA is started. For
GEM no process change occured, so 'appl_init' returns the same
ID as for STUFFER.
ADDRESS menu_regis. " STreet finder" 2 -[STUFFER]-> 1
ADDRESS evnt_multi MSG Buf $06C264
STUFFER Cconws "\escH\escY->" -> Cnt 79
STUFFER Cconws " " -> Cnt 26
STUFFER Cconws " " -> Cnt 26
STUFFER Cconws "\escH\escY->" -> Cnt 79
STUFFER Malloc $FFFFFF -> $08B95C
STUFFER Kbshift Mode -1 -> NoState
STUFFER Cconws "CALNDR.ACC" -> Cnt 26
STUFFER Pexec Load "C:\STUFFER\CLOCK.ACC" "" -> $06C6A8
STUFFER Mshrink $06C6A8 < Size $08B958/571736 > NewSize 9880
-> Ok
CLOCK appl_init
>CLOCK appl_init -> 2
STUFFER stole the 'menu_register' call and save the text internaly.
After each call to an 'Event_' function, STUFFER is reactivated. It
now loads the other DAs until there is no more DA or the memory is
exhausted or you hold down the right shift key.
If you select the STUFFER menu item, STUFFER draws its dialogbox
and wait for a button press.
STUFFER wind_update END_UPDATE -> 1
STUFFER v_clsvwk H 5 ->
STUFFER Super $000000 -> $008660
CLOCK evnt_multi -[STUFFER]-> (41 ,89 ) B$00 K$00 Key $0000
But $00 Event = MU_MESAG { AC_OPEN 4 }
CLOCK wind_update BEG_UPDATE -> 1
...
CLOCK wind_update END_UPDATE -> 1
CLOCK evnt_multi KYBD MSG TIMER { 1000,0 } Buf $075A8E
STUFFER evnt_multi KYBD MSG TIMER { 1000,0 } Buf $03D400 ->
(57 ,110) B $00 K$00 Key $00FD But $58
Event = MU_MESAG { WM_REDRAW H 4 (99 ,31 )
(80 ,119) }
STUFFER Super $000000 -> $008660
ADDRESS evnt_multi -[STUFFER]-> (57 ,110) B$00 K$00 Key $00FD
But $58 Event = MU_MESAG { WM_REDRAW H 4
(99 ,31 ) (80 ,119) }
ADDRESS wind_update BEG_UPDATE -> 1
...
ADDRESS wind_update END_UPDATE -> 1
ADDRESS evnt_multi KYBD MSG TIMER { 10000,0 } Buf $06E938
STUFFER evnt_multi KYBD MSG TIMER { 1000,0 } Buf $03D400 ->
(57 ,110) B $00 K$00 Key $0000 But $00
Event = MU_MESAG { WM_REDRAW H 5 (99 ,31 )
(92 ,59 ) }
...
CLOCK evnt_multi -[STUFFER]-> (57 ,110) B$00 K$00 Key $0000
But $00 Event = MU_MESAG { WM_REDRAW H 5
(99 ,31 ) (92 ,59 ) }
CLOCK wind_update BEG_UPDATE -> 1
...
All DAs run in alternate turns, a task switching occurs at
every 'Event' call. STUFFER combines the 'Event' calls and sends
'Timer' and 'KBD' to all DAs that selected 'Timer/KBD' events.
If there is an DA that does very short timer events, all DAs get
this high rate of timer events.
STUFFER saves which window belongs to which DA, so 'Window'-
messages are send only to the DA that openend the window.
For GEM everything looks as if only one DA is loaded, all DAs have
the same ID. STUFFER is the owner of all windows, the sub-DAs opened.
STUFFER reducts the GEM taskswitch by another layer.
7.5 Detect errors/mysteries in the system
------------------------------------------
(Not yet written...) Some mysteries and unknown errors of the
system are shown in this session.
After each program the desktop frees memory that does not belong
to it. The adress in the 'Mfree' calls is not valid. GEMDOS returns
a 'BadBlockAddres' error.
Another error in conjunction with the VDI workstations is shown.
This error occurs if you close a workstation that is not at the
end of the internal VDI list. All VDI workstations that are opened
afterwards get the same ID. This error can be produced very simple
with 2 or 3 CONTROL.ACCs. (BTW, i have written a patch for that: VdiFix)
When do you think a DA gets the 'AC_CLOSE' message ? If you start
a TOS program, the messages are send by the SCRNMGR, when the desktop
builds up again, _after_ the TOS program.
Another mysterie is with the desktop is the '\\X' file, GEM searches
if you press ESC in a desktop window. This is a simple HACK that
forces BIOS to rescan the directories up to the end and so actualise
the internal tables.
8. Extended information
===================================================
8.1 Patch variables
----------------------
Like in TEMPLEMON, OVERSCAN, CHMELEON, the SysMon has got some
patch variables to fit the users need. These are changed with a disk
monitor. At the start of SysMon.Prg you find the string 'SysMon_Var'.
This marks the start of the patch variables, which are listed in
table -6-
length| value | kind | | remark
-------+-------+-------------+-----------+--------------------------
Byte | 98 | Scan code | HELP | SysMon call
Byte | 1 | Shift state | ri.shift | SysMon call
Byte | 8 | Shift state | alternate | Abort installation
Byte | 4 | Shift state | control | Don't load Sys_Mon.Inf
Byte | 0 | Flag | white | Menu color
Byte | 1 | Flag | block | background color
Long | 10000 | | | length of file buffer
Long | 0 | | | Offset logbase
Long | 0 | | | Offset physbase
Word | 50 | Numb. Lines | | Trace-buffer
Byte | 102 | Scan code | block * | window dump to protofile
Byte | 0 | Flag | | external keyboard
table -6- Patch variables
If you modify the shift state for abort installation to zero,
SysMon will only be installed if you press shift,control or alternate
at the start of SysMon.
The logbase and physbase offsets are for the older versions of
OverScan ( <1.7)
8.2 Auto patch sequence
--------------------------
SysMon depends on some undocumented system variables. These are known
for all TOS-versions listed in table -1-. If SysMon is started under
a new TOS version, SysMon tries to locate the system variables.
- ActPD Pointer to the active process
- MBP Base of the memory lists
- AesBase Base of the 3 AES blocks
- AesList Pointerlist to the other AES blocks
- VdiList Basepointer to the first VDI workstation
To find the last three Variables, a minimum of 3 AES blocks and
VDI blocks have to be loaded. You can archive this by copying
the ATARI CONTROl.ACC 3 times to your boot disk. Then boot the system
and open all three control panels. Now start Sysmon.
After SysMon has found all adresses, Sysmon patches itself. If started
again, no auto-patch sequence is needed.
8.3 Special adaptions
------------------------
8.3.1 Color screens
-------------------
On color screens the SysMon screen is always in medium resolution.
When SysMon toggles to the other screen, the correct resolution is
selected.
8.3.2 Big screens
-----------------
If you use SysMon with a big screen,the SysMon output occurs on the
SM124. The driver of the MATRIX-monitors uses own VDI-workstation
tables, so SysMon cannout output the information in this tables.
8.3.3 OverScan
--------------
With OverScan or the new AutoSwitch-OverScan SysMon uses the resolution
that was active when SysMon was started. The additional lines are
used if SysMon is started after the OverScan-driver.
8.3.4 STE
---------
The STE has additional shifter registers, which allow to scroll the
screen bytewise. These registers are saved before switch the screen
and restored when SysMon switches back to the STE screen.
8.3.5 TT
--------
The new shifter registers of the TT are supported. On The TT SysMon
uses the ST-high resolution on its own screen independed of the TT
resolution.
8.3.6 68000-68030
-----------------
The stack layout of the various 680xx processors is supported. If
SysMon runs on a TT, als vectors are seen 32 bit clean, on the other
machines only the lower 24 bits of a vectors are used.
8.3.7 External keyboards
------------------------
SysMon does not use BIOS functions to test for right shift HELP. This
test is done in the keyboard interrupt. If you work with an external
PC-keyboard which does not produce keyboard interrupts (You must boot
a special keyboard-driver to use the keyboard), SysMon does not get the
right shift HELP keypress.
If you set the 'external keyboard' patch variable to 1, SysMon will do
a test for ALT-right shift-HELP. (right shift-HARDCOPY). A change of
the 'SysMon call' scan-code in the patch variables will not affect
this test. If you change the 'SysMon call' shift state, you must press
ALT-HELP plus the selected shift state.
8.4 Interna
--------------
- How SysMon detects programs that are loaded before SysMon:
The whole memory is scanned for basepages, programheader etc.
This scan is balanced with the MAL and MFL and a list of
resident memory blocks is built up.
Every memory block is scanned, whether a system vector points
into it, and there is a extra routine for harddisk drivers
- The output- and scroll-routines are compiled after the start of
Sysmon. So the scrolling/display rate is very high.
- The way of a single function call. Everything must go through
the SysTable, because this is the only way, in which SysMon
can hook out of the vectors:
- First the real trap jumps to the BypassTable
- For there it jumps to the routine that computes whether the function
produces output or not.
- If not traced, the function jumps to the BypassTable and up the
way through the traps without interfierence.
- If traced, the input parameters are listed
- The old return adress etc are put onto the FunctionStack and the
return adress on the stack is modified.
- Now the functions jumps up the old way throug the traps, reaches
the system and returns.
- If other programs have hooked into the traps and SysMon build up
a bypass, the program jumps to there bypass and from there to
the next station.
- Until the function returns to SysMon, other functions could have
entered SysMon etc. This does not matter, because of the
FunctionStack.
- The function returns to the SysTable, there the functions stack is
cleared.
- If SysMon is present (not hooked out of the traps) the output
parameters are listed.
- If the user wanted to enter SysMon, the SysMon menu is entered
- Then the SysTable restores the returnadress and jumps to the
caller.
SysMon doesnt modify any register, even the CCR is preserved.
A little trick in the aes-trap make every other program think
that th return address was not modified! This patch was needed,
because lots of programs test whether a call came from the
system or form another program (STUFFER,ICONDESK...)
- The source code of SysMon reached 27000 lines with 420 K bytes.
8.5 Bugs / Features
----------------------
Sometimes loaded progams are not recognised, this effect come often
with MODULA Shells that do 'LoadTime' linking. SysMon detects the
change of the ActPD, but the calls come from the runtime library
of the modula shell and not from the code of the program.
8.6 Extensions
-----------------
- I have implemented a menu for MicroRTX form Beckemeyer development.
Because noone asked me to include it, it is hidden in this
version of SysMon.
9. Shareware conditions
===================================================
If the following files
README, SYS_MON.PRG and SYS_MON.TXT
are copied without change, private users are allowed to give
SysMon to other users. Commercial revenue in every form is
NOT ALLOWED. This includes public-domain-discs or similar things.
You can give SysMon to your friend, even upload it into
mailbox system. All files on this disc should be compressed to
an archive (ARC, LH-ARC or ZOO).
You get the actual version if you send a 3.5" disc and an envelop
with stamps to my address. I work on it nearly every week.
The development of SysMon had cost 2 years, this is the reason why
it is not for free.
SysMon is a very complex product that requires lot of knowledge
by the user. So i decided to use the concept of ShareWare, which
means that you can copy SysMon and test if it fits your needs.
If you use SysMon you must pay for it, as you must pay for
a professional product. The ShareWare fee is $40.
If SysMon is used in professional environments, the higher ShareWare
fee of $80 is necaassary. For this $80 you get an automatic update
service and a bill, so that you can deduct it from your tax.
My bank is:
Karsten Isakovic
Sparkasse der Stadt Berlin
Kto: 0950128864
Blz: 10050000
Germany
Please note down you name and address in the comment field otherwise
i can not get in contact with you.
I take no responsibility for any direct or indirect damage -
including (but not restricted to) material and financial damage -
that result of the use of SysMon or the unfit of SysMon for a
desired purpose.
10. Contact
===================================================
You can reach me on the following ways
10.1 Via snail mail
----------------------
Karsten Isakovic
WilmersdorferStr. 82
D-1000 Berlin 12
Germany
10.2 Via electronic mail
---------------------------
Sub net: ki@opal.cs.tu-berlin.de
Fido net: K.I. % MAUS STA @ 2:242/2.6
Maus net: Karsten Isakovic @ STA